import request from "@/utils/request";
import type { productAttributeData, productAttributeObject } from "./type/type";
//获取商品平台属性接口
export const reqGetProductBaseList = (
  category1Id: number | string,
  category2Id: number | string,
  category3Id: number | string
) =>
  request.get<any, productAttributeData>(
    `/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`
  );

//添加商品属性和修改商品属性
export const reqAddOrUpdateAttr = (data: productAttributeObject) =>
  request.post<any, any>("/admin/product/saveAttrInfo", data);
//删除商品属性接口
export const delAttribute = (attrId: number | string) => {
  request.delete(`/admin/product/deleteAttr/${attrId}`);
};
